package com.wctj.api.base.enums;

/**
 * 支付模式枚举
 * @author: lzg
 * @description: : 0:普通模式，1：服务商模式，2:二级商户模式 ，3:随行付，4:汇付天下斗拱，5：汇付天下adapay
 */
public enum PayModeEnums {
    normal (0,"普通模式"),
    service_provider(1,"服务商模式"),
    second_merchant(2,"二级商户模式"),
    sui_xing(3,"随行付"),
    huifu_dougong(4,"汇付天下斗拱"),
    huifu_adapay(5,"汇付天下adapay"),
    cmb(6,"招商"),

    ;

    private int code;
    private String msg;

    public String getMsg() {
        return msg;
    }

    PayModeEnums(int code, String message) {
        this.code = code;
        this.msg = message;
    }

    public static PayModeEnums of(int code) {
        for (PayModeEnums plat : PayModeEnums.values()) {
            if (plat.getCode()== code) {
                return plat;
            }
        }
        return null;
    }
    public static PayModeEnums of(String name) {
        for (PayModeEnums plat : PayModeEnums.values()) {
            if (plat.name().equalsIgnoreCase(name)) {
                return plat;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }
}

